-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include a nodegroup's graph as nodegroup.graphid #11397
base: dev/8.0.x
Are you sure you want to change the base?
Conversation
…p_graphid_fk merges latest from dev/8.0.x into branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -715,6 +715,9 @@ class NodeGroup(models.Model): | |||
null=True, | |||
on_delete=models.CASCADE, | |||
) # Allows nodegroups within nodegroups | |||
graph = models.ForeignKey( | |||
GraphModel, db_column="graphid", blank=True, null=True, on_delete=models.CASCADE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this blank=False in order to add some friction?
@@ -715,6 +715,9 @@ class NodeGroup(models.Model): | |||
null=True, | |||
on_delete=models.CASCADE, | |||
) # Allows nodegroups within nodegroups | |||
graph = models.ForeignKey( | |||
GraphModel, db_column="graphid", blank=True, null=True, on_delete=models.CASCADE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, null=True doesn't really gel with on_delete=cascade, so if it's only here to support preexisting cruft data, and we already have a major version bump, maybe we just add a command to manage.py validate that deletes cruft nodegroups, and say you have to run that fix before upgrading to 8? WDYT?
Types of changes
Description of Change
Issues Solved
Closes #11396
Checklist
Accessibility Checklist
Developer Guide
Ticket Background
Further comments